x-extend:
  schema: config-values.yaml
type: object
properties:
  internal:
    type: object
    default: {}
    properties:
      defaultStorageClass:
        type: string
        x-examples:
        - fast-lun102-7d0bf578
      compatibilityFlag:
        type: string
        x-examples:
          - "none"
      storageClasses:
        type: array
        x-examples:
          - [{name: "mydsname", path: "/my/ds/path/mydsname", zones: ["zonea", "zoneb"], datastoreType: "Datastore", datastoreURL: "ds:///vmfs/volumes/1cb87aa4-2bbc0832-5682-626039300014/"}]
        items:
          type: object
          additionalProperties: false
          required: ["datastoreType", "datastoreURL", "name", "path", "zones"]
          properties:
            datastoreType:
              type: string
            datastoreURL:
              type: string
            name:
              type: string
            path:
              type: string
            zones:
              type: array
              items:
                type: string
      providerClusterConfiguration:
        type: object
        additionalProperties: false
        required: [regionTagCategory, zoneTagCategory, region, sshPublicKey, vmFolderPath, provider]
        x-examples:
          - sshPublicKey: "mysshkey1"
            region: myreg
            regionTagCategory: myregtagcat
            zoneTagCategory: myzonetagcat
            provider:
              server: myhost
              username: myuname
              password: myPaSsWd
              insecure: true
            zones: ["aaa", "bbb"]
            vmFolderPath: dev/test
            masterNodeGroup:
              instanceClass:
                datastore: dev/lun_1
                mainNetwork: k8s-msk/test_187
                memory: 8192
                numCPUs: 4
                template: dev/golden_image
              replicas: 1
          - sshPublicKey: "mysshkey"
            region: myreg
            regionTagCategory: myregtagcat
            zoneTagCategory: myzonetagcat
            provider:
              server: myhost
              username: myuname
              password: myPaSsWd
              insecure: true
            zones: ["aaa", "bbb"]
            vmFolderPath: dev/test
            nsxt:
              defaultIpPoolName: main
              defaultTcpAppProfileName: profile1
              defaultUdpAppProfileName: profile2
              size: SMALL
              tier1GatewayPath: /host/tier1
              user: user
              password: password
              host: 1.2.3.4
          - sshPublicKey: "mysshkey"
            region: myreg
            regionTagCategory: myregtagcat
            zoneTagCategory: myzonetagcat
            provider:
              server: myhost
              username: myuname
              password: myPaSsWd
              insecure: true
            zones: ["aaa", "bbb"]
            vmFolderPath: dev/test
            nsxt:
              defaultIpPoolName: main
              defaultTcpAppProfileName: profile1
              defaultUdpAppProfileName: profile2
              size: SMALL
              tier1GatewayPath: /host/tier1
              user: user
              password: password
              host: 1.2.3.4
              loadBalancerClass:
              - name: class1
                ipPoolName: pool2
        properties:
          apiVersion:
            type: string
            enum: [deckhouse.io/v1, deckhouse.io/v1alpha1]
          kind:
            type: string
            enum: [VsphereClusterConfiguration]
          baseResourcePool:
            type: string
          zones:
            type: array
            items:
              type: string
          layout:
            type: string
          internalNetworkCIDR:
            type: string
          region:
            type: string
          sshPublicKey:
            type: string
          disableTimesync:
            type: boolean
            default: true
          regionTagCategory:
            type: string
          zoneTagCategory:
            type: string
          vmFolderPath:
            type: string
          vmFolderExists:
            type: boolean
          externalNetworkNames:
            type: array
            items:
              type: string
          internalNetworkNames:
            type: array
            items:
              type: string
          nodeGroups:
            type: array
            items:
              type: object
              required: [name, replicas, instanceClass]
              properties:
                name:
                  type: string
                replicas:
                  type: integer
                nodeTemplate:
                  properties:
                    labels:
                      type: object
                      additionalProperties:
                        type: string
                    annotations:
                      type: object
                      additionalProperties:
                        type: string
                    taints:
                      type: array
                      items:
                        type: object
                        properties:
                          effect:
                            type: string
                            enum: [NoSchedule, PreferNoSchedule, NoExecute]
                          key:
                            type: string
                          value:
                            type: string
                zones:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  uniqueItems: true
                instanceClass:
                  type: object
                  additionalProperties: false
                  required: [numCPUs, memory, template, mainNetwork, datastore]
                  properties:
                    numCPUs:
                      type: integer
                    memory:
                      type: integer
                    template:
                      type: string
                    mainNetwork:
                      type: string
                    datastore:
                      type: string
                    additionalNetworks:
                      type: array
                      items:
                        type: string
                    rootDiskSize:
                      type: integer
                    resourcePool:
                      type: string
                    mainNetworkIPAddresses:
                      type: array
                      items:
                        type: object
                        required: [address, gateway, nameservers]
                        properties:
                          address:
                            type: string
                            pattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(3[0-2]|[1-2][0-9]|[0-9]))$'
                          gateway:
                            type: string
                            pattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'
                          nameservers:
                            type: object
                            properties:
                              addresses:
                                type: array
                                items:
                                  type: string
                                  pattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'
                              search:
                                type: array
                                items:
                                  type: string
                    runtimeOptions:
                      type: object
                      properties:
                        nestedHardwareVirtualization:
                          type: boolean
                        cpuShares:
                          type: integer
                        cpuLimit:
                          type: integer
                        cpuReservation:
                          type: integer
                        memoryShares:
                          type: integer
                          minimum: 0
                          maximum: 100
                        memoryLimit:
                          type: integer
                        memoryReservation:
                          type: integer
                          minimum: 0
                          maximum: 100
          masterNodeGroup:
            type: object
            additionalProperties: false
            required: [replicas, instanceClass]
            properties:
              replicas:
                type: integer
                minimum: 1
              zones:
                type: array
                items:
                  type: string
                minItems: 1
                uniqueItems: true
              instanceClass:
                type: object
                additionalProperties: false
                required: [numCPUs, memory, template, mainNetwork, datastore]
                properties:
                  numCPUs:
                    type: integer
                  memory:
                    type: integer
                  template:
                    type: string
                  mainNetwork:
                    type: string
                  datastore:
                    type: string
                  additionalNetworks:
                    type: array
                    items:
                      type: string
                  rootDiskSize:
                    type: integer
                  resourcePool:
                    type: string
                  mainNetworkIPAddresses:
                    type: array
                    items:
                      type: object
                      required: [address, gateway, nameservers]
                      properties:
                        address:
                          type: string
                          pattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(3[0-2]|[1-2][0-9]|[0-9]))$'
                        gateway:
                          type: string
                          pattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'
                        nameservers:
                          type: object
                          properties:
                            addresses:
                              type: array
                              items:
                                type: string
                                pattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'
                            search:
                              type: array
                              items:
                                type: string
                  runtimeOptions:
                    type: object
                    properties:
                      nestedHardwareVirtualization:
                        type: boolean
                      cpuShares:
                        type: integer
                      cpuLimit:
                        type: integer
                      cpuReservation:
                        type: integer
                      memoryShares:
                        type: integer
                        minimum: 0
                        maximum: 100
                      memoryLimit:
                        type: integer
                      memoryReservation:
                        type: integer
                        minimum: 0
                        maximum: 100
          provider:
            type: object
            additionalProperties: false
            required: [server, username, password]
            properties:
              server:
                type: string
              username:
                type: string
              password:
                type: string
              insecure:
                type: boolean
          nsxt:
            type: object
            required: [ defaultIpPoolName, size, tier1GatewayPath, user, password, host, defaultTcpAppProfileName, defaultUdpAppProfileName ]
            properties:
              defaultIpPoolName:
                type: string
              defaultTcpAppProfileName:
                type: string
              defaultUdpAppProfileName:
                type: string
              size:
                type: string
                enum: [ "SMALL", "MEDIUM", "LARGE", "XLARGE" ]
              tier1GatewayPath:
                type: string
              user:
                type: string
              password:
                type: string
              host:
                type: string
              insecureFlag:
                type: boolean
              loadBalancerClass:
                type: array
                items:
                  required: [ name, ipPoolName ]
                  properties:
                    name:
                      type: string
                    ipPoolName:
                      type: string
                    tcpAppProfileName:
                      type: string
                    udpAppProfileName:
                      type: string
      providerDiscoveryData:
        type: object
        additionalProperties: false
        properties:
          apiVersion:
            type: string
            enum: [deckhouse.io/v1, deckhouse.io/v1alpha1]
          kind:
            type: string
            enum: [VsphereCloudDiscoveryData]
          vmFolderPath:
            type: string
          resourcePoolPath:
            type: string
          zones:
            type: array
            items:
              type: string
      vsphereDiscoveryData:
        type: object
        additionalProperties: false
        required: [datacenter]
        x-examples:
          - datacenter: test
        properties:
          datacenter:
            type: string
          zones:
            type: array
            items:
              type: string
      cniSecretData:
        type: string
